home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power Programmierung
/
Power-Programmierung (Tewi)(1994).iso
/
magazine
/
dbms_mag
/
9108
/
techtip1.aug
< prev
next >
Wrap
Text File
|
1991-06-17
|
2KB
|
73 lines
LISTING 1
* Author: Bo Guo & Carl Kurt,
* Transportation Ctr., Univ. of Kanasa, Lawrence, KS 66045
* Note: Block code and program code for changing cursor type
* Language: dBXL/QuickSilver 1.3
**** The following block should be place in the main calling program ****
* Before changing cursor type, read original type by
* calling DOS function 03hex at DOS interrupt 10hex
PUBL IntNum,AxReg,BxReg,CxReg,DxReg,CH,CL
AxReg = HTOI("0300")
IntNum = HTOI("10")
STORE 0 to BxReg,CxReg,DxReg
DOSINT IntNum,AxReg,BxReg,CxReg,DxReg
CH = int(cxreg/256) && Starting scan line of the original cursor
CL = mod(cxreg,256) && Ending scan line of the original cursor
**** End of the Block ****
**** Program for changing cursor type ****
* CURSTYP.PRG, Call DOS function 01hex at DOS interrupt 10hex
PARA Switch
PRIV IntNum,AxReg,BxReg,CxReg,DxReg
IntNum = 16
AxReg = 256
Store 0 to BxReg, CxReg, DxReg
DO CASE
CASE Switch = 0 && Turn off Cursor (Set CH = 20h)
CxReg = 32*256 + CL
CASE Switch = 1 && Restore original Cursor type
CxReg = CH*256 + CL
CASE Switch = 2 && Full Cursor (Set CH = 0h)
CxReg = CL
ENDC
DOSINT IntNum,AxReg,BxReg,CxReg,DxReg
RETU
**** End of the Program ****
* PROG: CURSMAIN.PRG
* calls CURSTYP.PRG for test
SET TALK OFF
CLEA
PUBL IntNum,AxReg,BxReg,CxReg,DxReg,CH,CL
AxReg = HTOI("0300")
IntNum = HTOI("10")
STORE 0 to BxReg,CxReg,DxReg
DOSINT IntNum,AxReg,BxReg,CxReg,DxReg
CH = int(cxreg/256) && Starting scan line of the original cursor
CL = mod(cxreg,256) && Ending scan line of the original cursor
DO CURSTYP WITH 0
? "I am Gone.."
WAIT " "
?
DO CURSTYP WITH 2
? "I am Big.."
WAIT " "
?
DO CURSTYP WITH 1
? "I am Back.."
WAIT " "
RETU